3.27 \(\int x (a+b \tan (c+d \sqrt {x})) \, dx\)

Optimal. Leaf size=135 \[ \frac {a x^2}{2}-\frac {3 i b \text {Li}_4\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}-\frac {3 b \sqrt {x} \text {Li}_3\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {1}{2} i b x^2 \]

[Out]

1/2*a*x^2+1/2*I*b*x^2-2*b*x^(3/2)*ln(1+exp(2*I*(c+d*x^(1/2))))/d+3*I*b*x*polylog(2,-exp(2*I*(c+d*x^(1/2))))/d^
2-3/2*I*b*polylog(4,-exp(2*I*(c+d*x^(1/2))))/d^4-3*b*polylog(3,-exp(2*I*(c+d*x^(1/2))))*x^(1/2)/d^3

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 135, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 8, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {14, 3747, 3719, 2190, 2531, 6609, 2282, 6589} \[ \frac {a x^2}{2}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \text {Li}_3\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \text {Li}_4\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {1}{2} i b x^2 \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Tan[c + d*Sqrt[x]]),x]

[Out]

(a*x^2)/2 + (I/2)*b*x^2 - (2*b*x^(3/2)*Log[1 + E^((2*I)*(c + d*Sqrt[x]))])/d + ((3*I)*b*x*PolyLog[2, -E^((2*I)
*(c + d*Sqrt[x]))])/d^2 - (3*b*Sqrt[x]*PolyLog[3, -E^((2*I)*(c + d*Sqrt[x]))])/d^3 - (((3*I)/2)*b*PolyLog[4, -
E^((2*I)*(c + d*Sqrt[x]))])/d^4

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2190

Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
 (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m*Log[1 + (b*(F^(g*(e + f*x)))^n)/a])/(b*f*g*n*Log[F]), x]
 - Dist[(d*m)/(b*f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*Log[1 + (b*(F^(g*(e + f*x)))^n)/a], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]

Rule 2282

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 2531

Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> -Simp[((
f + g*x)^m*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)])/(b*c*n*Log[F]), x] + Dist[(g*m)/(b*c*n*Log[F]), Int[(f + g*x)
^(m - 1)*PolyLog[2, -(e*(F^(c*(a + b*x)))^n)], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]

Rule 3719

Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[(I*(c + d*x)^(m + 1))/(d*(m + 1)), x
] - Dist[2*I, Int[((c + d*x)^m*E^(2*I*(e + f*x)))/(1 + E^(2*I*(e + f*x))), x], x] /; FreeQ[{c, d, e, f}, x] &&
 IGtQ[m, 0]

Rule 3747

Int[(x_)^(m_.)*((a_.) + (b_.)*Tan[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Tan[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 6589

Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]

Rule 6609

Int[((e_.) + (f_.)*(x_))^(m_.)*PolyLog[n_, (d_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(p_.)], x_Symbol] :> Simp
[((e + f*x)^m*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p])/(b*c*p*Log[F]), x] - Dist[(f*m)/(b*c*p*Log[F]), Int[(e +
f*x)^(m - 1)*PolyLog[n + 1, d*(F^(c*(a + b*x)))^p], x], x] /; FreeQ[{F, a, b, c, d, e, f, n, p}, x] && GtQ[m,
0]

Rubi steps

\begin {align*} \int x \left (a+b \tan \left (c+d \sqrt {x}\right )\right ) \, dx &=\int \left (a x+b x \tan \left (c+d \sqrt {x}\right )\right ) \, dx\\ &=\frac {a x^2}{2}+b \int x \tan \left (c+d \sqrt {x}\right ) \, dx\\ &=\frac {a x^2}{2}+(2 b) \operatorname {Subst}\left (\int x^3 \tan (c+d x) \, dx,x,\sqrt {x}\right )\\ &=\frac {a x^2}{2}+\frac {1}{2} i b x^2-(4 i b) \operatorname {Subst}\left (\int \frac {e^{2 i (c+d x)} x^3}{1+e^{2 i (c+d x)}} \, dx,x,\sqrt {x}\right )\\ &=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {(6 b) \operatorname {Subst}\left (\int x^2 \log \left (1+e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d}\\ &=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {(6 i b) \operatorname {Subst}\left (\int x \text {Li}_2\left (-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^2}\\ &=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \text {Li}_3\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {(3 b) \operatorname {Subst}\left (\int \text {Li}_3\left (-e^{2 i (c+d x)}\right ) \, dx,x,\sqrt {x}\right )}{d^3}\\ &=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \text {Li}_3\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {(3 i b) \operatorname {Subst}\left (\int \frac {\text {Li}_3(-x)}{x} \, dx,x,e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}\\ &=\frac {a x^2}{2}+\frac {1}{2} i b x^2-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {3 b \sqrt {x} \text {Li}_3\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}-\frac {3 i b \text {Li}_4\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 135, normalized size = 1.00 \[ \frac {a x^2}{2}-\frac {3 i b \text {Li}_4\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{2 d^4}-\frac {3 b \sqrt {x} \text {Li}_3\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^3}+\frac {3 i b x \text {Li}_2\left (-e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d^2}-\frac {2 b x^{3/2} \log \left (1+e^{2 i \left (c+d \sqrt {x}\right )}\right )}{d}+\frac {1}{2} i b x^2 \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Tan[c + d*Sqrt[x]]),x]

[Out]

(a*x^2)/2 + (I/2)*b*x^2 - (2*b*x^(3/2)*Log[1 + E^((2*I)*(c + d*Sqrt[x]))])/d + ((3*I)*b*x*PolyLog[2, -E^((2*I)
*(c + d*Sqrt[x]))])/d^2 - (3*b*Sqrt[x]*PolyLog[3, -E^((2*I)*(c + d*Sqrt[x]))])/d^3 - (((3*I)/2)*b*PolyLog[4, -
E^((2*I)*(c + d*Sqrt[x]))])/d^4

________________________________________________________________________________________

fricas [F]  time = 0.66, size = 0, normalized size = 0.00 \[ {\rm integral}\left (b x \tan \left (d \sqrt {x} + c\right ) + a x, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*tan(c+d*x^(1/2))),x, algorithm="fricas")

[Out]

integral(b*x*tan(d*sqrt(x) + c) + a*x, x)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \tan \left (d \sqrt {x} + c\right ) + a\right )} x\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*tan(c+d*x^(1/2))),x, algorithm="giac")

[Out]

integrate((b*tan(d*sqrt(x) + c) + a)*x, x)

________________________________________________________________________________________

maple [F]  time = 0.83, size = 0, normalized size = 0.00 \[ \int x \left (a +b \tan \left (c +d \sqrt {x}\right )\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*tan(c+d*x^(1/2))),x)

[Out]

int(x*(a+b*tan(c+d*x^(1/2))),x)

________________________________________________________________________________________

maxima [B]  time = 0.56, size = 359, normalized size = 2.66 \[ \frac {3 \, {\left (d \sqrt {x} + c\right )}^{4} a + 3 i \, {\left (d \sqrt {x} + c\right )}^{4} b - 12 \, {\left (d \sqrt {x} + c\right )}^{3} a c - 12 i \, {\left (d \sqrt {x} + c\right )}^{3} b c + 18 \, {\left (d \sqrt {x} + c\right )}^{2} a c^{2} + 18 i \, {\left (d \sqrt {x} + c\right )}^{2} b c^{2} - 12 \, {\left (d \sqrt {x} + c\right )} a c^{3} - 12 \, b c^{3} \log \left (\sec \left (d \sqrt {x} + c\right )\right ) - {\left (16 i \, {\left (d \sqrt {x} + c\right )}^{3} b - 36 i \, {\left (d \sqrt {x} + c\right )}^{2} b c + 36 i \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \arctan \left (\sin \left (2 \, d \sqrt {x} + 2 \, c\right ), \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) + 1\right ) - {\left (-24 i \, {\left (d \sqrt {x} + c\right )}^{2} b + 36 i \, {\left (d \sqrt {x} + c\right )} b c - 18 i \, b c^{2}\right )} {\rm Li}_2\left (-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}\right ) - 2 \, {\left (4 \, {\left (d \sqrt {x} + c\right )}^{3} b - 9 \, {\left (d \sqrt {x} + c\right )}^{2} b c + 9 \, {\left (d \sqrt {x} + c\right )} b c^{2}\right )} \log \left (\cos \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + \sin \left (2 \, d \sqrt {x} + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d \sqrt {x} + 2 \, c\right ) + 1\right ) - 12 i \, b {\rm Li}_{4}(-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )}) - 6 \, {\left (4 \, {\left (d \sqrt {x} + c\right )} b - 3 \, b c\right )} {\rm Li}_{3}(-e^{\left (2 i \, d \sqrt {x} + 2 i \, c\right )})}{6 \, d^{4}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*tan(c+d*x^(1/2))),x, algorithm="maxima")

[Out]

1/6*(3*(d*sqrt(x) + c)^4*a + 3*I*(d*sqrt(x) + c)^4*b - 12*(d*sqrt(x) + c)^3*a*c - 12*I*(d*sqrt(x) + c)^3*b*c +
 18*(d*sqrt(x) + c)^2*a*c^2 + 18*I*(d*sqrt(x) + c)^2*b*c^2 - 12*(d*sqrt(x) + c)*a*c^3 - 12*b*c^3*log(sec(d*sqr
t(x) + c)) - (16*I*(d*sqrt(x) + c)^3*b - 36*I*(d*sqrt(x) + c)^2*b*c + 36*I*(d*sqrt(x) + c)*b*c^2)*arctan2(sin(
2*d*sqrt(x) + 2*c), cos(2*d*sqrt(x) + 2*c) + 1) - (-24*I*(d*sqrt(x) + c)^2*b + 36*I*(d*sqrt(x) + c)*b*c - 18*I
*b*c^2)*dilog(-e^(2*I*d*sqrt(x) + 2*I*c)) - 2*(4*(d*sqrt(x) + c)^3*b - 9*(d*sqrt(x) + c)^2*b*c + 9*(d*sqrt(x)
+ c)*b*c^2)*log(cos(2*d*sqrt(x) + 2*c)^2 + sin(2*d*sqrt(x) + 2*c)^2 + 2*cos(2*d*sqrt(x) + 2*c) + 1) - 12*I*b*p
olylog(4, -e^(2*I*d*sqrt(x) + 2*I*c)) - 6*(4*(d*sqrt(x) + c)*b - 3*b*c)*polylog(3, -e^(2*I*d*sqrt(x) + 2*I*c))
)/d^4

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int x\,\left (a+b\,\mathrm {tan}\left (c+d\,\sqrt {x}\right )\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a + b*tan(c + d*x^(1/2))),x)

[Out]

int(x*(a + b*tan(c + d*x^(1/2))), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int x \left (a + b \tan {\left (c + d \sqrt {x} \right )}\right )\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*tan(c+d*x**(1/2))),x)

[Out]

Integral(x*(a + b*tan(c + d*sqrt(x))), x)

________________________________________________________________________________________